package cn.agiledata.bank.common.service.email;

import java.util.Calendar;
import java.util.Date;
import java.util.Map;

import cn.agiledata.bank.common.service.NotifyMail;
import cn.agiledata.bank.common.util.DateUtil;
import cn.agiledata.bank.hibernateBean.Account;
import cn.agiledata.bank.hibernateBean.ScoresHis;
import cn.agiledata.bank.hibernateBean.SubAccount;
import cn.agiledata.bank.hibernateBean.Transaction;

public class EmailActive extends NotifyMail {
    private String account;
    private String activeURL;
    private String activeCode;
    private String urlpath;
    private Date now;
    private Account ac;
    
    protected SubAccount setMailContext(Map vnvMap, Transaction tran,
            ScoresHis score) {
        vnvMap.put("account", getAccount());
        vnvMap.put("activeURL", getActiveURL());
        vnvMap.put("activeCode", getActiveCode());
        vnvMap.put("urlpath", getUrlpath());
        vnvMap.put("now", DateUtil.date2String(Calendar.getInstance().getTime()));
        return getAc().getDefaultSubAccount();
    }

    public Account getAc() {
        return ac;
    }

    public void setAc(Account ac) {
        this.ac = ac;
    }

    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public String getActiveCode() {
        return activeCode;
    }

    public void setActiveCode(String activeCode) {
        this.activeCode = activeCode;
    }

    public String getActiveURL() {
        return activeURL;
    }

    public void setActiveURL(String activeURL) {
        this.activeURL = activeURL;
    }

    public Date getNow() {
        return now;
    }

    public void setNow(Date now) {
        this.now = now;
    }

    public String getUrlpath() {
        return urlpath;
    }

    public void setUrlpath(String urlpath) {
        this.urlpath = urlpath;
    }

}
